package com.zq.order;

import com.zq.order.config.OrderStatisticsTask;
import com.zq.order.dao.entity.OrderStatistics;
import com.zq.order.mapper.OrderStatisticsMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.test.context.SpringBootTest;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author 张乔
 * @Date 2025/2/24 14:40
 */
@SpringBootTest
public class testApplication {


    @Autowired
    private OrderStatisticsMapper orderStatisticsMapper;


    @Autowired
    private OrderStatisticsTask orderStatisticsTask;

    @Test
    public void test01(){
        orderStatisticsTask.orderTotalAmountStatistics();
    }








    @Test
    public void test(){
        OrderStatistics orderStatistics = new OrderStatistics();

        orderStatistics.setTotalNum(10);
        orderStatistics.setTotalAmount(BigDecimal.valueOf(100.00));


        orderStatistics.setOrderDate(LocalDate.from(LocalDateTime.now()));
     orderStatisticsMapper.insert(orderStatistics);



    }



}
